#include "settingmenu.h"
#include "ui_settingmenu.h"

SettingMenu::SettingMenu(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::SettingMenu)
{
    ui->setupUi(this);
    setAttribute(Qt::WA_StyledBackground);
}

SettingMenu::~SettingMenu()
{
    delete ui;
}

void SettingMenu::paintEvent(QPaintEvent *event)
{
    // 移动至父窗口往下20
    QWidget *pa = dynamic_cast<QWidget*>(parent());
    QPoint p = pa->pos();
    QSize s = pa->size();
    move(s.width() - size().width() - 5, 80);
}



void SettingMenu::on_pushButton_clicked()
{
    hide();
    emit showPasswordManager();
}


void SettingMenu::on_pushButton_3_clicked()
{
    // 打开历史记录窗口
    emit showHistoryWindow();
}


void SettingMenu::on_pushButton_2_clicked()
{
    // 打开收藏夹窗口
    emit showFaviroteWindow();
}




void SettingMenu::on_pushButton_4_clicked()
{
    // 打开插件管理器
    emit showPluginManagerWindow();
}


void SettingMenu::on_pushButton_5_clicked()
{
    // 打开配置窗口
    emit showConfigWindow();
}


void SettingMenu::on_pushButton_6_clicked()
{

}

